<?php


/**
 * Base class that represents a row from the 'reports_total' table.
 *
 *
 *
 * @package    propel.generator.damages.om
 */
abstract class DamagesBaseReportsTotal extends BaseObject implements Persistent
{
    /**
     * Peer class name
     */
    const PEER = 'DamagesReportsTotalPeer';

    /**
     * The Peer class.
     * Instance provides a convenient way of calling static methods on a class
     * that calling code may not be able to identify.
     * @var        DamagesReportsTotalPeer
     */
    protected static $peer;

    /**
     * The flag var to prevent infinit loop in deep copy
     * @var       boolean
     */
    protected $startCopy = false;

    /**
     * The value for the szkoda_id field.
     * @var        int
     */
    protected $szkoda_id;

    /**
     * The value for the data_zgloszenia_szkody field.
     * @var        string
     */
    protected $data_zgloszenia_szkody;

    /**
     * The value for the data_uszkodzenia field.
     * @var        string
     */
    protected $data_uszkodzenia;

    /**
     * The value for the data_zgloszenia_dealera field.
     * @var        string
     */
    protected $data_zgloszenia_dealera;

    /**
     * The value for the samochod_id field.
     * @var        int
     */
    protected $samochod_id;

    /**
     * The value for the samochod_vin field.
     * @var        string
     */
    protected $samochod_vin;

    /**
     * The value for the samochod_nazwa field.
     * @var        string
     */
    protected $samochod_nazwa;

    /**
     * The value for the samochod_nr_komisji field.
     * @var        string
     */
    protected $samochod_nr_komisji;

    /**
     * The value for the status_nazwa field.
     * @var        string
     */
    protected $status_nazwa;

    /**
     * The value for the marka_kod field.
     * @var        string
     */
    protected $marka_kod;

    /**
     * The value for the marka_nazwa field.
     * @var        string
     */
    protected $marka_nazwa;

    /**
     * The value for the dealer_numer field.
     * @var        string
     */
    protected $dealer_numer;

    /**
     * The value for the dealer_miasto field.
     * @var        string
     */
    protected $dealer_miasto;

    /**
     * The value for the uszkodzenie_rodzaj_kod field.
     * @var        string
     */
    protected $uszkodzenie_rodzaj_kod;

    /**
     * The value for the uszkodzenie_rodzaj_nazwa field.
     * @var        string
     */
    protected $uszkodzenie_rodzaj_nazwa;

    /**
     * The value for the uszkodzenie_miejsce_kod field.
     * @var        string
     */
    protected $uszkodzenie_miejsce_kod;

    /**
     * The value for the uszkodzenie_miejsce_nazwa field.
     * @var        string
     */
    protected $uszkodzenie_miejsce_nazwa;

    /**
     * The value for the uszkodzenie_rozmiar_kod field.
     * @var        string
     */
    protected $uszkodzenie_rozmiar_kod;

    /**
     * The value for the uszkodzenie_rozmiar_nazwa field.
     * @var        string
     */
    protected $uszkodzenie_rozmiar_nazwa;

    /**
     * The value for the kosztorys_wartosc field.
     * @var        string
     */
    protected $kosztorys_wartosc;

    /**
     * The value for the kosztorys_upust_flaga field.
     * @var        int
     */
    protected $kosztorys_upust_flaga;

    /**
     * The value for the kosztorys_upust_wartosc field.
     * @var        string
     */
    protected $kosztorys_upust_wartosc;

    /**
     * The value for the kosztorys_upust_procent field.
     * @var        string
     */
    protected $kosztorys_upust_procent;

    /**
     * The value for the kosztorys_wartosc_samochodu field.
     * @var        string
     */
    protected $kosztorys_wartosc_samochodu;

    /**
     * The value for the kosztorys_wartosc_odliczenia field.
     * @var        string
     */
    protected $kosztorys_wartosc_odliczenia;

    /**
     * The value for the kosztorys_data_dodania field.
     * @var        string
     */
    protected $kosztorys_data_dodania;

    /**
     * The value for the typ_nazwa field.
     * @var        string
     */
    protected $typ_nazwa;

    /**
     * The value for the typ_transportu field.
     * @var        string
     */
    protected $typ_transportu;

    /**
     * The value for the faktura_id field.
     * @var        int
     */
    protected $faktura_id;

    /**
     * The value for the faktura_wartosc_suma field.
     * @var        string
     */
    protected $faktura_wartosc_suma;

    /**
     * The value for the faktura_data_dodania field.
     * @var        string
     */
    protected $faktura_data_dodania;

    /**
     * The value for the nota_za_szkode_wartosc_suma field.
     * @var        string
     */
    protected $nota_za_szkode_wartosc_suma;

    /**
     * The value for the nota_za_szkode_data_dodania field.
     * @var        string
     */
    protected $nota_za_szkode_data_dodania;

    /**
     * The value for the nota_za_utrate_wartosci_wartosc_suma field.
     * @var        string
     */
    protected $nota_za_utrate_wartosci_wartosc_suma;

    /**
     * The value for the nota_za_utrate_wartosci_data_dodania field.
     * @var        string
     */
    protected $nota_za_utrate_wartosci_data_dodania;

    /**
     * The value for the prowadzacy_imie field.
     * @var        string
     */
    protected $prowadzacy_imie;

    /**
     * The value for the prowadzacy_nazwisko field.
     * @var        string
     */
    protected $prowadzacy_nazwisko;

    /**
     * The value for the opis_uszkodzenia field.
     * @var        string
     */
    protected $opis_uszkodzenia;

    /**
     * The value for the uwagi field.
     * @var        string
     */
    protected $uwagi;

    /**
     * Flag to prevent endless save loop, if this object is referenced
     * by another object which falls in this transaction.
     * @var        boolean
     */
    protected $alreadyInSave = false;

    /**
     * Flag to prevent endless validation loop, if this object is referenced
     * by another object which falls in this transaction.
     * @var        boolean
     */
    protected $alreadyInValidation = false;

    /**
     * Get the [szkoda_id] column value.
     *
     * @return int
     */
    public function getSzkodaId()
    {
        return $this->szkoda_id;
    }

    /**
     * Get the [optionally formatted] temporal [data_zgloszenia_szkody] column value.
     *
     *
     * @param string $format The date/time format string (either date()-style or strftime()-style).
     *				 If format is null, then the raw DateTime object will be returned.
     * @return mixed Formatted date/time value as string or DateTime object (if format is null), null if column is null
     * @throws PropelException - if unable to parse/validate the date/time value.
     */
    public function getDataZgloszeniaSzkody($format = 'Y-m-d H:i:s')
    {
        if ($this->data_zgloszenia_szkody === null) {
            return null;
        }


        try {
            $dt = new DateTime($this->data_zgloszenia_szkody);
        } catch (Exception $x) {
            throw new PropelException("Internally stored date/time/timestamp value could not be converted to DateTime: " . var_export($this->data_zgloszenia_szkody, true), $x);
        }

        if ($format === null) {
            // Because propel.useDateTimeClass is true, we return a DateTime object.
            return $dt;
        } elseif (strpos($format, '%') !== false) {
            return strftime($format, $dt->format('U'));
        } else {
            return $dt->format($format);
        }
    }

    /**
     * Get the [optionally formatted] temporal [data_uszkodzenia] column value.
     *
     *
     * @param string $format The date/time format string (either date()-style or strftime()-style).
     *				 If format is null, then the raw DateTime object will be returned.
     * @return mixed Formatted date/time value as string or DateTime object (if format is null), null if column is null
     * @throws PropelException - if unable to parse/validate the date/time value.
     */
    public function getDataUszkodzenia($format = 'Y-m-d H:i:s')
    {
        if ($this->data_uszkodzenia === null) {
            return null;
        }


        try {
            $dt = new DateTime($this->data_uszkodzenia);
        } catch (Exception $x) {
            throw new PropelException("Internally stored date/time/timestamp value could not be converted to DateTime: " . var_export($this->data_uszkodzenia, true), $x);
        }

        if ($format === null) {
            // Because propel.useDateTimeClass is true, we return a DateTime object.
            return $dt;
        } elseif (strpos($format, '%') !== false) {
            return strftime($format, $dt->format('U'));
        } else {
            return $dt->format($format);
        }
    }

    /**
     * Get the [optionally formatted] temporal [data_zgloszenia_dealera] column value.
     *
     *
     * @param string $format The date/time format string (either date()-style or strftime()-style).
     *				 If format is null, then the raw DateTime object will be returned.
     * @return mixed Formatted date/time value as string or DateTime object (if format is null), null if column is null
     * @throws PropelException - if unable to parse/validate the date/time value.
     */
    public function getDataZgloszeniaDealera($format = 'Y-m-d H:i:s')
    {
        if ($this->data_zgloszenia_dealera === null) {
            return null;
        }


        try {
            $dt = new DateTime($this->data_zgloszenia_dealera);
        } catch (Exception $x) {
            throw new PropelException("Internally stored date/time/timestamp value could not be converted to DateTime: " . var_export($this->data_zgloszenia_dealera, true), $x);
        }

        if ($format === null) {
            // Because propel.useDateTimeClass is true, we return a DateTime object.
            return $dt;
        } elseif (strpos($format, '%') !== false) {
            return strftime($format, $dt->format('U'));
        } else {
            return $dt->format($format);
        }
    }

    /**
     * Get the [samochod_id] column value.
     *
     * @return int
     */
    public function getSamochodId()
    {
        return $this->samochod_id;
    }

    /**
     * Get the [samochod_vin] column value.
     *
     * @return string
     */
    public function getSamochodVin()
    {
        return $this->samochod_vin;
    }

    /**
     * Get the [samochod_nazwa] column value.
     *
     * @return string
     */
    public function getSamochodNazwa()
    {
        return $this->samochod_nazwa;
    }

    /**
     * Get the [samochod_nr_komisji] column value.
     *
     * @return string
     */
    public function getSamochodNrKomisji()
    {
        return $this->samochod_nr_komisji;
    }

    /**
     * Get the [status_nazwa] column value.
     *
     * @return string
     */
    public function getStatusNazwa()
    {
        return $this->status_nazwa;
    }

    /**
     * Get the [marka_kod] column value.
     *
     * @return string
     */
    public function getMarkaKod()
    {
        return $this->marka_kod;
    }

    /**
     * Get the [marka_nazwa] column value.
     *
     * @return string
     */
    public function getMarkaNazwa()
    {
        return $this->marka_nazwa;
    }

    /**
     * Get the [dealer_numer] column value.
     *
     * @return string
     */
    public function getDealerNumer()
    {
        return $this->dealer_numer;
    }

    /**
     * Get the [dealer_miasto] column value.
     *
     * @return string
     */
    public function getDealerMiasto()
    {
        return $this->dealer_miasto;
    }

    /**
     * Get the [uszkodzenie_rodzaj_kod] column value.
     *
     * @return string
     */
    public function getUszkodzenieRodzajKod()
    {
        return $this->uszkodzenie_rodzaj_kod;
    }

    /**
     * Get the [uszkodzenie_rodzaj_nazwa] column value.
     *
     * @return string
     */
    public function getUszkodzenieRodzajNazwa()
    {
        return $this->uszkodzenie_rodzaj_nazwa;
    }

    /**
     * Get the [uszkodzenie_miejsce_kod] column value.
     *
     * @return string
     */
    public function getUszkodzenieMiejsceKod()
    {
        return $this->uszkodzenie_miejsce_kod;
    }

    /**
     * Get the [uszkodzenie_miejsce_nazwa] column value.
     *
     * @return string
     */
    public function getUszkodzenieMiejsceNazwa()
    {
        return $this->uszkodzenie_miejsce_nazwa;
    }

    /**
     * Get the [uszkodzenie_rozmiar_kod] column value.
     *
     * @return string
     */
    public function getUszkodzenieRozmiarKod()
    {
        return $this->uszkodzenie_rozmiar_kod;
    }

    /**
     * Get the [uszkodzenie_rozmiar_nazwa] column value.
     *
     * @return string
     */
    public function getUszkodzenieRozmiarNazwa()
    {
        return $this->uszkodzenie_rozmiar_nazwa;
    }

    /**
     * Get the [kosztorys_wartosc] column value.
     *
     * @return string
     */
    public function getKosztorysWartosc()
    {
        return $this->kosztorys_wartosc;
    }

    /**
     * Get the [kosztorys_upust_flaga] column value.
     *
     * @return int
     */
    public function getKosztorysUpustFlaga()
    {
        return $this->kosztorys_upust_flaga;
    }

    /**
     * Get the [kosztorys_upust_wartosc] column value.
     *
     * @return string
     */
    public function getKosztorysUpustWartosc()
    {
        return $this->kosztorys_upust_wartosc;
    }

    /**
     * Get the [kosztorys_upust_procent] column value.
     *
     * @return string
     */
    public function getKosztorysUpustProcent()
    {
        return $this->kosztorys_upust_procent;
    }

    /**
     * Get the [kosztorys_wartosc_samochodu] column value.
     *
     * @return string
     */
    public function getKosztorysWartoscSamochodu()
    {
        return $this->kosztorys_wartosc_samochodu;
    }

    /**
     * Get the [kosztorys_wartosc_odliczenia] column value.
     *
     * @return string
     */
    public function getKosztorysWartoscOdliczenie()
    {
        return $this->kosztorys_wartosc_odliczenia;
    }

    /**
     * Get the [optionally formatted] temporal [kosztorys_data_dodania] column value.
     *
     *
     * @param string $format The date/time format string (either date()-style or strftime()-style).
     *				 If format is null, then the raw DateTime object will be returned.
     * @return mixed Formatted date/time value as string or DateTime object (if format is null), null if column is null
     * @throws PropelException - if unable to parse/validate the date/time value.
     */
    public function getKosztorysDataDodania($format = 'Y-m-d H:i:s')
    {
        if ($this->kosztorys_data_dodania === null) {
            return null;
        }


        try {
            $dt = new DateTime($this->kosztorys_data_dodania);
        } catch (Exception $x) {
            throw new PropelException("Internally stored date/time/timestamp value could not be converted to DateTime: " . var_export($this->kosztorys_data_dodania, true), $x);
        }

        if ($format === null) {
            // Because propel.useDateTimeClass is true, we return a DateTime object.
            return $dt;
        } elseif (strpos($format, '%') !== false) {
            return strftime($format, $dt->format('U'));
        } else {
            return $dt->format($format);
        }
    }

    /**
     * Get the [typ_nazwa] column value.
     *
     * @return string
     */
    public function getTypNazwa()
    {
        return $this->typ_nazwa;
    }

    /**
     * Get the [typ_transportu] column value.
     *
     * @return string
     */
    public function getTypTransportu()
    {
        return $this->typ_transportu;
    }

    /**
     * Get the [faktura_id] column value.
     *
     * @return int
     */
    public function getFakturaId()
    {
        return $this->faktura_id;
    }

    /**
     * Get the [faktura_wartosc_suma] column value.
     *
     * @return string
     */
    public function getFakturaWartoscSuma()
    {
        return $this->faktura_wartosc_suma;
    }

    /**
     * Get the [optionally formatted] temporal [faktura_data_dodania] column value.
     *
     *
     * @param string $format The date/time format string (either date()-style or strftime()-style).
     *				 If format is null, then the raw DateTime object will be returned.
     * @return mixed Formatted date/time value as string or DateTime object (if format is null), null if column is null
     * @throws PropelException - if unable to parse/validate the date/time value.
     */
    public function getFakturaDataDodania($format = 'Y-m-d H:i:s')
    {
        if ($this->faktura_data_dodania === null) {
            return null;
        }


        try {
            $dt = new DateTime($this->faktura_data_dodania);
        } catch (Exception $x) {
            throw new PropelException("Internally stored date/time/timestamp value could not be converted to DateTime: " . var_export($this->faktura_data_dodania, true), $x);
        }

        if ($format === null) {
            // Because propel.useDateTimeClass is true, we return a DateTime object.
            return $dt;
        } elseif (strpos($format, '%') !== false) {
            return strftime($format, $dt->format('U'));
        } else {
            return $dt->format($format);
        }
    }

    /**
     * Get the [nota_za_szkode_wartosc_suma] column value.
     *
     * @return string
     */
    public function getNotaZaSzkodeWartoscSuma()
    {
        return $this->nota_za_szkode_wartosc_suma;
    }

    /**
     * Get the [optionally formatted] temporal [nota_za_szkode_data_dodania] column value.
     *
     *
     * @param string $format The date/time format string (either date()-style or strftime()-style).
     *				 If format is null, then the raw DateTime object will be returned.
     * @return mixed Formatted date/time value as string or DateTime object (if format is null), null if column is null
     * @throws PropelException - if unable to parse/validate the date/time value.
     */
    public function getNotaZaSzkodeDataDodania($format = 'Y-m-d H:i:s')
    {
        if ($this->nota_za_szkode_data_dodania === null) {
            return null;
        }


        try {
            $dt = new DateTime($this->nota_za_szkode_data_dodania);
        } catch (Exception $x) {
            throw new PropelException("Internally stored date/time/timestamp value could not be converted to DateTime: " . var_export($this->nota_za_szkode_data_dodania, true), $x);
        }

        if ($format === null) {
            // Because propel.useDateTimeClass is true, we return a DateTime object.
            return $dt;
        } elseif (strpos($format, '%') !== false) {
            return strftime($format, $dt->format('U'));
        } else {
            return $dt->format($format);
        }
    }

    /**
     * Get the [nota_za_utrate_wartosci_wartosc_suma] column value.
     *
     * @return string
     */
    public function getNotaZaUtrateWartosciWartoscSuma()
    {
        return $this->nota_za_utrate_wartosci_wartosc_suma;
    }

    /**
     * Get the [optionally formatted] temporal [nota_za_utrate_wartosci_data_dodania] column value.
     *
     *
     * @param string $format The date/time format string (either date()-style or strftime()-style).
     *				 If format is null, then the raw DateTime object will be returned.
     * @return mixed Formatted date/time value as string or DateTime object (if format is null), null if column is null
     * @throws PropelException - if unable to parse/validate the date/time value.
     */
    public function getNotaZaUtrateWartosciDataDodania($format = 'Y-m-d H:i:s')
    {
        if ($this->nota_za_utrate_wartosci_data_dodania === null) {
            return null;
        }


        try {
            $dt = new DateTime($this->nota_za_utrate_wartosci_data_dodania);
        } catch (Exception $x) {
            throw new PropelException("Internally stored date/time/timestamp value could not be converted to DateTime: " . var_export($this->nota_za_utrate_wartosci_data_dodania, true), $x);
        }

        if ($format === null) {
            // Because propel.useDateTimeClass is true, we return a DateTime object.
            return $dt;
        } elseif (strpos($format, '%') !== false) {
            return strftime($format, $dt->format('U'));
        } else {
            return $dt->format($format);
        }
    }

    /**
     * Get the [prowadzacy_imie] column value.
     *
     * @return string
     */
    public function getProwadzacyImie()
    {
        return $this->prowadzacy_imie;
    }

    /**
     * Get the [prowadzacy_nazwisko] column value.
     *
     * @return string
     */
    public function getProwadzacyNazwisko()
    {
        return $this->prowadzacy_nazwisko;
    }

    /**
     * Get the [opis_uszkodzenia] column value.
     *
     * @return string
     */
    public function getOpisUszkodzenia()
    {
        return $this->opis_uszkodzenia;
    }

    /**
     * Get the [uwagi] column value.
     *
     * @return string
     */
    public function getUwagi()
    {
        return $this->uwagi;
    }

    /**
     * Set the value of [szkoda_id] column.
     *
     * @param int $v new value
     * @return DamagesReportsTotal The current object (for fluent API support)
     */
    public function setSzkodaId($v)
    {
        if ($v !== null) {
            $v = (int) $v;
        }

        if ($this->szkoda_id !== $v) {
            $this->szkoda_id = $v;
            $this->modifiedColumns[] = DamagesReportsTotalPeer::SZKODA_ID;
        }


        return $this;
    } // setSzkodaId()

    /**
     * Sets the value of [data_zgloszenia_szkody] column to a normalized version of the date/time value specified.
     *
     * @param mixed $v string, integer (timestamp), or DateTime value.
     *               Empty strings are treated as null.
     * @return DamagesReportsTotal The current object (for fluent API support)
     */
    public function setDataZgloszeniaSzkody($v)
    {
        $dt = PropelDateTime::newInstance($v, null, 'DateTime');
        if ($this->data_zgloszenia_szkody !== null || $dt !== null) {
            $currentDateAsString = ($this->data_zgloszenia_szkody !== null && $tmpDt = new DateTime($this->data_zgloszenia_szkody)) ? $tmpDt->format('Y-m-d H:i:s') : null;
            $newDateAsString = $dt ? $dt->format('Y-m-d H:i:s') : null;
            if ($currentDateAsString !== $newDateAsString) {
                $this->data_zgloszenia_szkody = $newDateAsString;
                $this->modifiedColumns[] = DamagesReportsTotalPeer::DATA_ZGLOSZENIA_SZKODY;
            }
        } // if either are not null


        return $this;
    } // setDataZgloszeniaSzkody()

    /**
     * Sets the value of [data_uszkodzenia] column to a normalized version of the date/time value specified.
     *
     * @param mixed $v string, integer (timestamp), or DateTime value.
     *               Empty strings are treated as null.
     * @return DamagesReportsTotal The current object (for fluent API support)
     */
    public function setDataUszkodzenia($v)
    {
        $dt = PropelDateTime::newInstance($v, null, 'DateTime');
        if ($this->data_uszkodzenia !== null || $dt !== null) {
            $currentDateAsString = ($this->data_uszkodzenia !== null && $tmpDt = new DateTime($this->data_uszkodzenia)) ? $tmpDt->format('Y-m-d H:i:s') : null;
            $newDateAsString = $dt ? $dt->format('Y-m-d H:i:s') : null;
            if ($currentDateAsString !== $newDateAsString) {
                $this->data_uszkodzenia = $newDateAsString;
                $this->modifiedColumns[] = DamagesReportsTotalPeer::DATA_USZKODZENIA;
            }
        } // if either are not null


        return $this;
    } // setDataUszkodzenia()

    /**
     * Sets the value of [data_zgloszenia_dealera] column to a normalized version of the date/time value specified.
     *
     * @param mixed $v string, integer (timestamp), or DateTime value.
     *               Empty strings are treated as null.
     * @return DamagesReportsTotal The current object (for fluent API support)
     */
    public function setDataZgloszeniaDealera($v)
    {
        $dt = PropelDateTime::newInstance($v, null, 'DateTime');
        if ($this->data_zgloszenia_dealera !== null || $dt !== null) {
            $currentDateAsString = ($this->data_zgloszenia_dealera !== null && $tmpDt = new DateTime($this->data_zgloszenia_dealera)) ? $tmpDt->format('Y-m-d H:i:s') : null;
            $newDateAsString = $dt ? $dt->format('Y-m-d H:i:s') : null;
            if ($currentDateAsString !== $newDateAsString) {
                $this->data_zgloszenia_dealera = $newDateAsString;
                $this->modifiedColumns[] = DamagesReportsTotalPeer::DATA_ZGLOSZENIA_DEALERA;
            }
        } // if either are not null


        return $this;
    } // setDataZgloszeniaDealera()

    /**
     * Set the value of [samochod_id] column.
     *
     * @param int $v new value
     * @return DamagesReportsTotal The current object (for fluent API support)
     */
    public function setSamochodId($v)
    {
        if ($v !== null) {
            $v = (int) $v;
        }

        if ($this->samochod_id !== $v) {
            $this->samochod_id = $v;
            $this->modifiedColumns[] = DamagesReportsTotalPeer::SAMOCHOD_ID;
        }


        return $this;
    } // setSamochodId()

    /**
     * Set the value of [samochod_vin] column.
     *
     * @param string $v new value
     * @return DamagesReportsTotal The current object (for fluent API support)
     */
    public function setSamochodVin($v)
    {
        if ($v !== null) {
            $v = (string) $v;
        }

        if ($this->samochod_vin !== $v) {
            $this->samochod_vin = $v;
            $this->modifiedColumns[] = DamagesReportsTotalPeer::SAMOCHOD_VIN;
        }


        return $this;
    } // setSamochodVin()

    /**
     * Set the value of [samochod_nazwa] column.
     *
     * @param string $v new value
     * @return DamagesReportsTotal The current object (for fluent API support)
     */
    public function setSamochodNazwa($v)
    {
        if ($v !== null) {
            $v = (string) $v;
        }

        if ($this->samochod_nazwa !== $v) {
            $this->samochod_nazwa = $v;
            $this->modifiedColumns[] = DamagesReportsTotalPeer::SAMOCHOD_NAZWA;
        }


        return $this;
    } // setSamochodNazwa()

    /**
     * Set the value of [samochod_nr_komisji] column.
     *
     * @param string $v new value
     * @return DamagesReportsTotal The current object (for fluent API support)
     */
    public function setSamochodNrKomisji($v)
    {
        if ($v !== null) {
            $v = (string) $v;
        }

        if ($this->samochod_nr_komisji !== $v) {
            $this->samochod_nr_komisji = $v;
            $this->modifiedColumns[] = DamagesReportsTotalPeer::SAMOCHOD_NR_KOMISJI;
        }


        return $this;
    } // setSamochodNrKomisji()

    /**
     * Set the value of [status_nazwa] column.
     *
     * @param string $v new value
     * @return DamagesReportsTotal The current object (for fluent API support)
     */
    public function setStatusNazwa($v)
    {
        if ($v !== null) {
            $v = (string) $v;
        }

        if ($this->status_nazwa !== $v) {
            $this->status_nazwa = $v;
            $this->modifiedColumns[] = DamagesReportsTotalPeer::STATUS_NAZWA;
        }


        return $this;
    } // setStatusNazwa()

    /**
     * Set the value of [marka_kod] column.
     *
     * @param string $v new value
     * @return DamagesReportsTotal The current object (for fluent API support)
     */
    public function setMarkaKod($v)
    {
        if ($v !== null) {
            $v = (string) $v;
        }

        if ($this->marka_kod !== $v) {
            $this->marka_kod = $v;
            $this->modifiedColumns[] = DamagesReportsTotalPeer::MARKA_KOD;
        }


        return $this;
    } // setMarkaKod()

    /**
     * Set the value of [marka_nazwa] column.
     *
     * @param string $v new value
     * @return DamagesReportsTotal The current object (for fluent API support)
     */
    public function setMarkaNazwa($v)
    {
        if ($v !== null) {
            $v = (string) $v;
        }

        if ($this->marka_nazwa !== $v) {
            $this->marka_nazwa = $v;
            $this->modifiedColumns[] = DamagesReportsTotalPeer::MARKA_NAZWA;
        }


        return $this;
    } // setMarkaNazwa()

    /**
     * Set the value of [dealer_numer] column.
     *
     * @param string $v new value
     * @return DamagesReportsTotal The current object (for fluent API support)
     */
    public function setDealerNumer($v)
    {
        if ($v !== null) {
            $v = (string) $v;
        }

        if ($this->dealer_numer !== $v) {
            $this->dealer_numer = $v;
            $this->modifiedColumns[] = DamagesReportsTotalPeer::DEALER_NUMER;
        }


        return $this;
    } // setDealerNumer()

    /**
     * Set the value of [dealer_miasto] column.
     *
     * @param string $v new value
     * @return DamagesReportsTotal The current object (for fluent API support)
     */
    public function setDealerMiasto($v)
    {
        if ($v !== null) {
            $v = (string) $v;
        }

        if ($this->dealer_miasto !== $v) {
            $this->dealer_miasto = $v;
            $this->modifiedColumns[] = DamagesReportsTotalPeer::DEALER_MIASTO;
        }


        return $this;
    } // setDealerMiasto()

    /**
     * Set the value of [uszkodzenie_rodzaj_kod] column.
     *
     * @param string $v new value
     * @return DamagesReportsTotal The current object (for fluent API support)
     */
    public function setUszkodzenieRodzajKod($v)
    {
        if ($v !== null) {
            $v = (string) $v;
        }

        if ($this->uszkodzenie_rodzaj_kod !== $v) {
            $this->uszkodzenie_rodzaj_kod = $v;
            $this->modifiedColumns[] = DamagesReportsTotalPeer::USZKODZENIE_RODZAJ_KOD;
        }


        return $this;
    } // setUszkodzenieRodzajKod()

    /**
     * Set the value of [uszkodzenie_rodzaj_nazwa] column.
     *
     * @param string $v new value
     * @return DamagesReportsTotal The current object (for fluent API support)
     */
    public function setUszkodzenieRodzajNazwa($v)
    {
        if ($v !== null) {
            $v = (string) $v;
        }

        if ($this->uszkodzenie_rodzaj_nazwa !== $v) {
            $this->uszkodzenie_rodzaj_nazwa = $v;
            $this->modifiedColumns[] = DamagesReportsTotalPeer::USZKODZENIE_RODZAJ_NAZWA;
        }


        return $this;
    } // setUszkodzenieRodzajNazwa()

    /**
     * Set the value of [uszkodzenie_miejsce_kod] column.
     *
     * @param string $v new value
     * @return DamagesReportsTotal The current object (for fluent API support)
     */
    public function setUszkodzenieMiejsceKod($v)
    {
        if ($v !== null) {
            $v = (string) $v;
        }

        if ($this->uszkodzenie_miejsce_kod !== $v) {
            $this->uszkodzenie_miejsce_kod = $v;
            $this->modifiedColumns[] = DamagesReportsTotalPeer::USZKODZENIE_MIEJSCE_KOD;
        }


        return $this;
    } // setUszkodzenieMiejsceKod()

    /**
     * Set the value of [uszkodzenie_miejsce_nazwa] column.
     *
     * @param string $v new value
     * @return DamagesReportsTotal The current object (for fluent API support)
     */
    public function setUszkodzenieMiejsceNazwa($v)
    {
        if ($v !== null) {
            $v = (string) $v;
        }

        if ($this->uszkodzenie_miejsce_nazwa !== $v) {
            $this->uszkodzenie_miejsce_nazwa = $v;
            $this->modifiedColumns[] = DamagesReportsTotalPeer::USZKODZENIE_MIEJSCE_NAZWA;
        }


        return $this;
    } // setUszkodzenieMiejsceNazwa()

    /**
     * Set the value of [uszkodzenie_rozmiar_kod] column.
     *
     * @param string $v new value
     * @return DamagesReportsTotal The current object (for fluent API support)
     */
    public function setUszkodzenieRozmiarKod($v)
    {
        if ($v !== null) {
            $v = (string) $v;
        }

        if ($this->uszkodzenie_rozmiar_kod !== $v) {
            $this->uszkodzenie_rozmiar_kod = $v;
            $this->modifiedColumns[] = DamagesReportsTotalPeer::USZKODZENIE_ROZMIAR_KOD;
        }


        return $this;
    } // setUszkodzenieRozmiarKod()

    /**
     * Set the value of [uszkodzenie_rozmiar_nazwa] column.
     *
     * @param string $v new value
     * @return DamagesReportsTotal The current object (for fluent API support)
     */
    public function setUszkodzenieRozmiarNazwa($v)
    {
        if ($v !== null) {
            $v = (string) $v;
        }

        if ($this->uszkodzenie_rozmiar_nazwa !== $v) {
            $this->uszkodzenie_rozmiar_nazwa = $v;
            $this->modifiedColumns[] = DamagesReportsTotalPeer::USZKODZENIE_ROZMIAR_NAZWA;
        }


        return $this;
    } // setUszkodzenieRozmiarNazwa()

    /**
     * Set the value of [kosztorys_wartosc] column.
     *
     * @param string $v new value
     * @return DamagesReportsTotal The current object (for fluent API support)
     */
    public function setKosztorysWartosc($v)
    {
        if ($v !== null) {
            $v = (string) $v;
        }

        if ($this->kosztorys_wartosc !== $v) {
            $this->kosztorys_wartosc = $v;
            $this->modifiedColumns[] = DamagesReportsTotalPeer::KOSZTORYS_WARTOSC;
        }


        return $this;
    } // setKosztorysWartosc()

    /**
     * Set the value of [kosztorys_upust_flaga] column.
     *
     * @param int $v new value
     * @return DamagesReportsTotal The current object (for fluent API support)
     */
    public function setKosztorysUpustFlaga($v)
    {
        if ($v !== null) {
            $v = (int) $v;
        }

        if ($this->kosztorys_upust_flaga !== $v) {
            $this->kosztorys_upust_flaga = $v;
            $this->modifiedColumns[] = DamagesReportsTotalPeer::KOSZTORYS_UPUST_FLAGA;
        }


        return $this;
    } // setKosztorysUpustFlaga()

    /**
     * Set the value of [kosztorys_upust_wartosc] column.
     *
     * @param string $v new value
     * @return DamagesReportsTotal The current object (for fluent API support)
     */
    public function setKosztorysUpustWartosc($v)
    {
        if ($v !== null) {
            $v = (string) $v;
        }

        if ($this->kosztorys_upust_wartosc !== $v) {
            $this->kosztorys_upust_wartosc = $v;
            $this->modifiedColumns[] = DamagesReportsTotalPeer::KOSZTORYS_UPUST_WARTOSC;
        }


        return $this;
    } // setKosztorysUpustWartosc()

    /**
     * Set the value of [kosztorys_upust_procent] column.
     *
     * @param string $v new value
     * @return DamagesReportsTotal The current object (for fluent API support)
     */
    public function setKosztorysUpustProcent($v)
    {
        if ($v !== null) {
            $v = (string) $v;
        }

        if ($this->kosztorys_upust_procent !== $v) {
            $this->kosztorys_upust_procent = $v;
            $this->modifiedColumns[] = DamagesReportsTotalPeer::KOSZTORYS_UPUST_PROCENT;
        }


        return $this;
    } // setKosztorysUpustProcent()

    /**
     * Set the value of [kosztorys_wartosc_samochodu] column.
     *
     * @param string $v new value
     * @return DamagesReportsTotal The current object (for fluent API support)
     */
    public function setKosztorysWartoscSamochodu($v)
    {
        if ($v !== null) {
            $v = (string) $v;
        }

        if ($this->kosztorys_wartosc_samochodu !== $v) {
            $this->kosztorys_wartosc_samochodu = $v;
            $this->modifiedColumns[] = DamagesReportsTotalPeer::KOSZTORYS_WARTOSC_SAMOCHODU;
        }


        return $this;
    } // setKosztorysWartoscSamochodu()

    /**
     * Set the value of [kosztorys_wartosc_odliczenia] column.
     *
     * @param string $v new value
     * @return DamagesReportsTotal The current object (for fluent API support)
     */
    public function setKosztorysWartoscOdliczenie($v)
    {
        if ($v !== null) {
            $v = (string) $v;
        }

        if ($this->kosztorys_wartosc_odliczenia !== $v) {
            $this->kosztorys_wartosc_odliczenia = $v;
            $this->modifiedColumns[] = DamagesReportsTotalPeer::KOSZTORYS_WARTOSC_ODLICZENIA;
        }


        return $this;
    } // setKosztorysWartoscOdliczenie()

    /**
     * Sets the value of [kosztorys_data_dodania] column to a normalized version of the date/time value specified.
     *
     * @param mixed $v string, integer (timestamp), or DateTime value.
     *               Empty strings are treated as null.
     * @return DamagesReportsTotal The current object (for fluent API support)
     */
    public function setKosztorysDataDodania($v)
    {
        $dt = PropelDateTime::newInstance($v, null, 'DateTime');
        if ($this->kosztorys_data_dodania !== null || $dt !== null) {
            $currentDateAsString = ($this->kosztorys_data_dodania !== null && $tmpDt = new DateTime($this->kosztorys_data_dodania)) ? $tmpDt->format('Y-m-d H:i:s') : null;
            $newDateAsString = $dt ? $dt->format('Y-m-d H:i:s') : null;
            if ($currentDateAsString !== $newDateAsString) {
                $this->kosztorys_data_dodania = $newDateAsString;
                $this->modifiedColumns[] = DamagesReportsTotalPeer::KOSZTORYS_DATA_DODANIA;
            }
        } // if either are not null


        return $this;
    } // setKosztorysDataDodania()

    /**
     * Set the value of [typ_nazwa] column.
     *
     * @param string $v new value
     * @return DamagesReportsTotal The current object (for fluent API support)
     */
    public function setTypNazwa($v)
    {
        if ($v !== null) {
            $v = (string) $v;
        }

        if ($this->typ_nazwa !== $v) {
            $this->typ_nazwa = $v;
            $this->modifiedColumns[] = DamagesReportsTotalPeer::TYP_NAZWA;
        }


        return $this;
    } // setTypNazwa()

    /**
     * Set the value of [typ_transportu] column.
     *
     * @param string $v new value
     * @return DamagesReportsTotal The current object (for fluent API support)
     */
    public function setTypTransportu($v)
    {
        if ($v !== null) {
            $v = (string) $v;
        }

        if ($this->typ_transportu !== $v) {
            $this->typ_transportu = $v;
            $this->modifiedColumns[] = DamagesReportsTotalPeer::TYP_TRANSPORTU;
        }


        return $this;
    } // setTypTransportu()

    /**
     * Set the value of [faktura_id] column.
     *
     * @param int $v new value
     * @return DamagesReportsTotal The current object (for fluent API support)
     */
    public function setFakturaId($v)
    {
        if ($v !== null) {
            $v = (int) $v;
        }

        if ($this->faktura_id !== $v) {
            $this->faktura_id = $v;
            $this->modifiedColumns[] = DamagesReportsTotalPeer::FAKTURA_ID;
        }


        return $this;
    } // setFakturaId()

    /**
     * Set the value of [faktura_wartosc_suma] column.
     *
     * @param string $v new value
     * @return DamagesReportsTotal The current object (for fluent API support)
     */
    public function setFakturaWartoscSuma($v)
    {
        if ($v !== null) {
            $v = (string) $v;
        }

        if ($this->faktura_wartosc_suma !== $v) {
            $this->faktura_wartosc_suma = $v;
            $this->modifiedColumns[] = DamagesReportsTotalPeer::FAKTURA_WARTOSC_SUMA;
        }


        return $this;
    } // setFakturaWartoscSuma()

    /**
     * Sets the value of [faktura_data_dodania] column to a normalized version of the date/time value specified.
     *
     * @param mixed $v string, integer (timestamp), or DateTime value.
     *               Empty strings are treated as null.
     * @return DamagesReportsTotal The current object (for fluent API support)
     */
    public function setFakturaDataDodania($v)
    {
        $dt = PropelDateTime::newInstance($v, null, 'DateTime');
        if ($this->faktura_data_dodania !== null || $dt !== null) {
            $currentDateAsString = ($this->faktura_data_dodania !== null && $tmpDt = new DateTime($this->faktura_data_dodania)) ? $tmpDt->format('Y-m-d H:i:s') : null;
            $newDateAsString = $dt ? $dt->format('Y-m-d H:i:s') : null;
            if ($currentDateAsString !== $newDateAsString) {
                $this->faktura_data_dodania = $newDateAsString;
                $this->modifiedColumns[] = DamagesReportsTotalPeer::FAKTURA_DATA_DODANIA;
            }
        } // if either are not null


        return $this;
    } // setFakturaDataDodania()

    /**
     * Set the value of [nota_za_szkode_wartosc_suma] column.
     *
     * @param string $v new value
     * @return DamagesReportsTotal The current object (for fluent API support)
     */
    public function setNotaZaSzkodeWartoscSuma($v)
    {
        if ($v !== null) {
            $v = (string) $v;
        }

        if ($this->nota_za_szkode_wartosc_suma !== $v) {
            $this->nota_za_szkode_wartosc_suma = $v;
            $this->modifiedColumns[] = DamagesReportsTotalPeer::NOTA_ZA_SZKODE_WARTOSC_SUMA;
        }


        return $this;
    } // setNotaZaSzkodeWartoscSuma()

    /**
     * Sets the value of [nota_za_szkode_data_dodania] column to a normalized version of the date/time value specified.
     *
     * @param mixed $v string, integer (timestamp), or DateTime value.
     *               Empty strings are treated as null.
     * @return DamagesReportsTotal The current object (for fluent API support)
     */
    public function setNotaZaSzkodeDataDodania($v)
    {
        $dt = PropelDateTime::newInstance($v, null, 'DateTime');
        if ($this->nota_za_szkode_data_dodania !== null || $dt !== null) {
            $currentDateAsString = ($this->nota_za_szkode_data_dodania !== null && $tmpDt = new DateTime($this->nota_za_szkode_data_dodania)) ? $tmpDt->format('Y-m-d H:i:s') : null;
            $newDateAsString = $dt ? $dt->format('Y-m-d H:i:s') : null;
            if ($currentDateAsString !== $newDateAsString) {
                $this->nota_za_szkode_data_dodania = $newDateAsString;
                $this->modifiedColumns[] = DamagesReportsTotalPeer::NOTA_ZA_SZKODE_DATA_DODANIA;
            }
        } // if either are not null


        return $this;
    } // setNotaZaSzkodeDataDodania()

    /**
     * Set the value of [nota_za_utrate_wartosci_wartosc_suma] column.
     *
     * @param string $v new value
     * @return DamagesReportsTotal The current object (for fluent API support)
     */
    public function setNotaZaUtrateWartosciWartoscSuma($v)
    {
        if ($v !== null) {
            $v = (string) $v;
        }

        if ($this->nota_za_utrate_wartosci_wartosc_suma !== $v) {
            $this->nota_za_utrate_wartosci_wartosc_suma = $v;
            $this->modifiedColumns[] = DamagesReportsTotalPeer::NOTA_ZA_UTRATE_WARTOSCI_WARTOSC_SUMA;
        }


        return $this;
    } // setNotaZaUtrateWartosciWartoscSuma()

    /**
     * Sets the value of [nota_za_utrate_wartosci_data_dodania] column to a normalized version of the date/time value specified.
     *
     * @param mixed $v string, integer (timestamp), or DateTime value.
     *               Empty strings are treated as null.
     * @return DamagesReportsTotal The current object (for fluent API support)
     */
    public function setNotaZaUtrateWartosciDataDodania($v)
    {
        $dt = PropelDateTime::newInstance($v, null, 'DateTime');
        if ($this->nota_za_utrate_wartosci_data_dodania !== null || $dt !== null) {
            $currentDateAsString = ($this->nota_za_utrate_wartosci_data_dodania !== null && $tmpDt = new DateTime($this->nota_za_utrate_wartosci_data_dodania)) ? $tmpDt->format('Y-m-d H:i:s') : null;
            $newDateAsString = $dt ? $dt->format('Y-m-d H:i:s') : null;
            if ($currentDateAsString !== $newDateAsString) {
                $this->nota_za_utrate_wartosci_data_dodania = $newDateAsString;
                $this->modifiedColumns[] = DamagesReportsTotalPeer::NOTA_ZA_UTRATE_WARTOSCI_DATA_DODANIA;
            }
        } // if either are not null


        return $this;
    } // setNotaZaUtrateWartosciDataDodania()

    /**
     * Set the value of [prowadzacy_imie] column.
     *
     * @param string $v new value
     * @return DamagesReportsTotal The current object (for fluent API support)
     */
    public function setProwadzacyImie($v)
    {
        if ($v !== null) {
            $v = (string) $v;
        }

        if ($this->prowadzacy_imie !== $v) {
            $this->prowadzacy_imie = $v;
            $this->modifiedColumns[] = DamagesReportsTotalPeer::PROWADZACY_IMIE;
        }


        return $this;
    } // setProwadzacyImie()

    /**
     * Set the value of [prowadzacy_nazwisko] column.
     *
     * @param string $v new value
     * @return DamagesReportsTotal The current object (for fluent API support)
     */
    public function setProwadzacyNazwisko($v)
    {
        if ($v !== null) {
            $v = (string) $v;
        }

        if ($this->prowadzacy_nazwisko !== $v) {
            $this->prowadzacy_nazwisko = $v;
            $this->modifiedColumns[] = DamagesReportsTotalPeer::PROWADZACY_NAZWISKO;
        }


        return $this;
    } // setProwadzacyNazwisko()

    /**
     * Set the value of [opis_uszkodzenia] column.
     *
     * @param string $v new value
     * @return DamagesReportsTotal The current object (for fluent API support)
     */
    public function setOpisUszkodzenia($v)
    {
        if ($v !== null) {
            $v = (string) $v;
        }

        if ($this->opis_uszkodzenia !== $v) {
            $this->opis_uszkodzenia = $v;
            $this->modifiedColumns[] = DamagesReportsTotalPeer::OPIS_USZKODZENIA;
        }


        return $this;
    } // setOpisUszkodzenia()

    /**
     * Set the value of [uwagi] column.
     *
     * @param string $v new value
     * @return DamagesReportsTotal The current object (for fluent API support)
     */
    public function setUwagi($v)
    {
        if ($v !== null) {
            $v = (string) $v;
        }

        if ($this->uwagi !== $v) {
            $this->uwagi = $v;
            $this->modifiedColumns[] = DamagesReportsTotalPeer::UWAGI;
        }


        return $this;
    } // setUwagi()

    /**
     * Indicates whether the columns in this object are only set to default values.
     *
     * This method can be used in conjunction with isModified() to indicate whether an object is both
     * modified _and_ has some values set which are non-default.
     *
     * @return boolean Whether the columns in this object are only been set with default values.
     */
    public function hasOnlyDefaultValues()
    {
        // otherwise, everything was equal, so return true
        return true;
    } // hasOnlyDefaultValues()

    /**
     * Hydrates (populates) the object variables with values from the database resultset.
     *
     * An offset (0-based "start column") is specified so that objects can be hydrated
     * with a subset of the columns in the resultset rows.  This is needed, for example,
     * for results of JOIN queries where the resultset row includes columns from two or
     * more tables.
     *
     * @param array $row The row returned by PDOStatement->fetch(PDO::FETCH_NUM)
     * @param int $startcol 0-based offset column which indicates which restultset column to start with.
     * @param boolean $rehydrate Whether this object is being re-hydrated from the database.
     * @return int             next starting column
     * @throws PropelException - Any caught Exception will be rewrapped as a PropelException.
     */
    public function hydrate($row, $startcol = 0, $rehydrate = false)
    {
        try {

            $this->szkoda_id = ($row[$startcol + 0] !== null) ? (int) $row[$startcol + 0] : null;
            $this->data_zgloszenia_szkody = ($row[$startcol + 1] !== null) ? (string) $row[$startcol + 1] : null;
            $this->data_uszkodzenia = ($row[$startcol + 2] !== null) ? (string) $row[$startcol + 2] : null;
            $this->data_zgloszenia_dealera = ($row[$startcol + 3] !== null) ? (string) $row[$startcol + 3] : null;
            $this->samochod_id = ($row[$startcol + 4] !== null) ? (int) $row[$startcol + 4] : null;
            $this->samochod_vin = ($row[$startcol + 5] !== null) ? (string) $row[$startcol + 5] : null;
            $this->samochod_nazwa = ($row[$startcol + 6] !== null) ? (string) $row[$startcol + 6] : null;
            $this->samochod_nr_komisji = ($row[$startcol + 7] !== null) ? (string) $row[$startcol + 7] : null;
            $this->status_nazwa = ($row[$startcol + 8] !== null) ? (string) $row[$startcol + 8] : null;
            $this->marka_kod = ($row[$startcol + 9] !== null) ? (string) $row[$startcol + 9] : null;
            $this->marka_nazwa = ($row[$startcol + 10] !== null) ? (string) $row[$startcol + 10] : null;
            $this->dealer_numer = ($row[$startcol + 11] !== null) ? (string) $row[$startcol + 11] : null;
            $this->dealer_miasto = ($row[$startcol + 12] !== null) ? (string) $row[$startcol + 12] : null;
            $this->uszkodzenie_rodzaj_kod = ($row[$startcol + 13] !== null) ? (string) $row[$startcol + 13] : null;
            $this->uszkodzenie_rodzaj_nazwa = ($row[$startcol + 14] !== null) ? (string) $row[$startcol + 14] : null;
            $this->uszkodzenie_miejsce_kod = ($row[$startcol + 15] !== null) ? (string) $row[$startcol + 15] : null;
            $this->uszkodzenie_miejsce_nazwa = ($row[$startcol + 16] !== null) ? (string) $row[$startcol + 16] : null;
            $this->uszkodzenie_rozmiar_kod = ($row[$startcol + 17] !== null) ? (string) $row[$startcol + 17] : null;
            $this->uszkodzenie_rozmiar_nazwa = ($row[$startcol + 18] !== null) ? (string) $row[$startcol + 18] : null;
            $this->kosztorys_wartosc = ($row[$startcol + 19] !== null) ? (string) $row[$startcol + 19] : null;
            $this->kosztorys_upust_flaga = ($row[$startcol + 20] !== null) ? (int) $row[$startcol + 20] : null;
            $this->kosztorys_upust_wartosc = ($row[$startcol + 21] !== null) ? (string) $row[$startcol + 21] : null;
            $this->kosztorys_upust_procent = ($row[$startcol + 22] !== null) ? (string) $row[$startcol + 22] : null;
            $this->kosztorys_wartosc_samochodu = ($row[$startcol + 23] !== null) ? (string) $row[$startcol + 23] : null;
            $this->kosztorys_wartosc_odliczenia = ($row[$startcol + 24] !== null) ? (string) $row[$startcol + 24] : null;
            $this->kosztorys_data_dodania = ($row[$startcol + 25] !== null) ? (string) $row[$startcol + 25] : null;
            $this->typ_nazwa = ($row[$startcol + 26] !== null) ? (string) $row[$startcol + 26] : null;
            $this->typ_transportu = ($row[$startcol + 27] !== null) ? (string) $row[$startcol + 27] : null;
            $this->faktura_id = ($row[$startcol + 28] !== null) ? (int) $row[$startcol + 28] : null;
            $this->faktura_wartosc_suma = ($row[$startcol + 29] !== null) ? (string) $row[$startcol + 29] : null;
            $this->faktura_data_dodania = ($row[$startcol + 30] !== null) ? (string) $row[$startcol + 30] : null;
            $this->nota_za_szkode_wartosc_suma = ($row[$startcol + 31] !== null) ? (string) $row[$startcol + 31] : null;
            $this->nota_za_szkode_data_dodania = ($row[$startcol + 32] !== null) ? (string) $row[$startcol + 32] : null;
            $this->nota_za_utrate_wartosci_wartosc_suma = ($row[$startcol + 33] !== null) ? (string) $row[$startcol + 33] : null;
            $this->nota_za_utrate_wartosci_data_dodania = ($row[$startcol + 34] !== null) ? (string) $row[$startcol + 34] : null;
            $this->prowadzacy_imie = ($row[$startcol + 35] !== null) ? (string) $row[$startcol + 35] : null;
            $this->prowadzacy_nazwisko = ($row[$startcol + 36] !== null) ? (string) $row[$startcol + 36] : null;
            $this->opis_uszkodzenia = ($row[$startcol + 37] !== null) ? (string) $row[$startcol + 37] : null;
            $this->uwagi = ($row[$startcol + 38] !== null) ? (string) $row[$startcol + 38] : null;
            $this->resetModified();

            $this->setNew(false);

            if ($rehydrate) {
                $this->ensureConsistency();
            }

            return $startcol + 39; // 39 = DamagesReportsTotalPeer::NUM_HYDRATE_COLUMNS.

        } catch (Exception $e) {
            throw new PropelException("Error populating DamagesReportsTotal object", $e);
        }
    }

    /**
     * Checks and repairs the internal consistency of the object.
     *
     * This method is executed after an already-instantiated object is re-hydrated
     * from the database.  It exists to check any foreign keys to make sure that
     * the objects related to the current object are correct based on foreign key.
     *
     * You can override this method in the stub class, but you should always invoke
     * the base method from the overridden method (i.e. parent::ensureConsistency()),
     * in case your model changes.
     *
     * @throws PropelException
     */
    public function ensureConsistency()
    {

    } // ensureConsistency

    /**
     * Reloads this object from datastore based on primary key and (optionally) resets all associated objects.
     *
     * This will only work if the object has been saved and has a valid primary key set.
     *
     * @param boolean $deep (optional) Whether to also de-associated any related objects.
     * @param PropelPDO $con (optional) The PropelPDO connection to use.
     * @return void
     * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db
     */
    public function reload($deep = false, PropelPDO $con = null)
    {
        if ($this->isDeleted()) {
            throw new PropelException("Cannot reload a deleted object.");
        }

        if ($this->isNew()) {
            throw new PropelException("Cannot reload an unsaved object.");
        }

        if ($con === null) {
            $con = Propel::getConnection(DamagesReportsTotalPeer::DATABASE_NAME, Propel::CONNECTION_READ);
        }

        // We don't need to alter the object instance pool; we're just modifying this instance
        // already in the pool.

        $stmt = DamagesReportsTotalPeer::doSelectStmt($this->buildPkeyCriteria(), $con);
        $row = $stmt->fetch(PDO::FETCH_NUM);
        $stmt->closeCursor();
        if (!$row) {
            throw new PropelException('Cannot find matching row in the database to reload object values.');
        }
        $this->hydrate($row, 0, true); // rehydrate

        if ($deep) {  // also de-associate any related objects?

        } // if (deep)
    }

    /**
     * Removes this object from datastore and sets delete attribute.
     *
     * @param PropelPDO $con
     * @return void
     * @throws PropelException
     * @throws Exception
     * @see        BaseObject::setDeleted()
     * @see        BaseObject::isDeleted()
     */
    public function delete(PropelPDO $con = null)
    {
        if ($this->isDeleted()) {
            throw new PropelException("This object has already been deleted.");
        }

        if ($con === null) {
            $con = Propel::getConnection(DamagesReportsTotalPeer::DATABASE_NAME, Propel::CONNECTION_WRITE);
        }

        $con->beginTransaction();
        try {
            $deleteQuery = DamagesReportsTotalQuery::create()
                ->filterByPrimaryKey($this->getPrimaryKey());
            $ret = $this->preDelete($con);
            if ($ret) {
                $deleteQuery->delete($con);
                $this->postDelete($con);
                $con->commit();
                $this->setDeleted(true);
            } else {
                $con->commit();
            }
        } catch (Exception $e) {
            $con->rollBack();
            throw $e;
        }
    }

    /**
     * Persists this object to the database.
     *
     * If the object is new, it inserts it; otherwise an update is performed.
     * All modified related objects will also be persisted in the doSave()
     * method.  This method wraps all precipitate database operations in a
     * single transaction.
     *
     * @param PropelPDO $con
     * @return int             The number of rows affected by this insert/update and any referring fk objects' save() operations.
     * @throws PropelException
     * @throws Exception
     * @see        doSave()
     */
    public function save(PropelPDO $con = null)
    {
        if ($this->isDeleted()) {
            throw new PropelException("You cannot save an object that has been deleted.");
        }

        if ($con === null) {
            $con = Propel::getConnection(DamagesReportsTotalPeer::DATABASE_NAME, Propel::CONNECTION_WRITE);
        }

        $con->beginTransaction();
        $isInsert = $this->isNew();
        try {
            $ret = $this->preSave($con);
            if ($isInsert) {
                $ret = $ret && $this->preInsert($con);
            } else {
                $ret = $ret && $this->preUpdate($con);
            }
            if ($ret) {
                $affectedRows = $this->doSave($con);
                if ($isInsert) {
                    $this->postInsert($con);
                } else {
                    $this->postUpdate($con);
                }
                $this->postSave($con);
                DamagesReportsTotalPeer::addInstanceToPool($this);
            } else {
                $affectedRows = 0;
            }
            $con->commit();

            return $affectedRows;
        } catch (Exception $e) {
            $con->rollBack();
            throw $e;
        }
    }

    /**
     * Performs the work of inserting or updating the row in the database.
     *
     * If the object is new, it inserts it; otherwise an update is performed.
     * All related objects are also updated in this method.
     *
     * @param PropelPDO $con
     * @return int             The number of rows affected by this insert/update and any referring fk objects' save() operations.
     * @throws PropelException
     * @see        save()
     */
    protected function doSave(PropelPDO $con)
    {
        $affectedRows = 0; // initialize var to track total num of affected rows
        if (!$this->alreadyInSave) {
            $this->alreadyInSave = true;

            if ($this->isNew() || $this->isModified()) {
                // persist changes
                if ($this->isNew()) {
                    $this->doInsert($con);
                } else {
                    $this->doUpdate($con);
                }
                $affectedRows += 1;
                $this->resetModified();
            }

            $this->alreadyInSave = false;

        }

        return $affectedRows;
    } // doSave()

    /**
     * Insert the row in the database.
     *
     * @param PropelPDO $con
     *
     * @throws PropelException
     * @see        doSave()
     */
    protected function doInsert(PropelPDO $con)
    {
        $criteria = $this->buildCriteria();
        $pk = BasePeer::doInsert($criteria, $con);
        $this->setNew(false);
    }

    /**
     * Update the row in the database.
     *
     * @param PropelPDO $con
     *
     * @see        doSave()
     */
    protected function doUpdate(PropelPDO $con)
    {
        $selectCriteria = $this->buildPkeyCriteria();
        $valuesCriteria = $this->buildCriteria();
        BasePeer::doUpdate($selectCriteria, $valuesCriteria, $con);
    }

    /**
     * Array of ValidationFailed objects.
     * @var        array ValidationFailed[]
     */
    protected $validationFailures = array();

    /**
     * Gets any ValidationFailed objects that resulted from last call to validate().
     *
     *
     * @return array ValidationFailed[]
     * @see        validate()
     */
    public function getValidationFailures()
    {
        return $this->validationFailures;
    }

    /**
     * Validates the objects modified field values and all objects related to this table.
     *
     * If $columns is either a column name or an array of column names
     * only those columns are validated.
     *
     * @param mixed $columns Column name or an array of column names.
     * @return boolean Whether all columns pass validation.
     * @see        doValidate()
     * @see        getValidationFailures()
     */
    public function validate($columns = null)
    {
        $res = $this->doValidate($columns);
        if ($res === true) {
            $this->validationFailures = array();

            return true;
        } else {
            $this->validationFailures = $res;

            return false;
        }
    }

    /**
     * This function performs the validation work for complex object models.
     *
     * In addition to checking the current object, all related objects will
     * also be validated.  If all pass then <code>true</code> is returned; otherwise
     * an aggreagated array of ValidationFailed objects will be returned.
     *
     * @param array $columns Array of column names to validate.
     * @return mixed <code>true</code> if all validations pass; array of <code>ValidationFailed</code> objets otherwise.
     */
    protected function doValidate($columns = null)
    {
        if (!$this->alreadyInValidation) {
            $this->alreadyInValidation = true;
            $retval = null;

            $failureMap = array();


            if (($retval = DamagesReportsTotalPeer::doValidate($this, $columns)) !== true) {
                $failureMap = array_merge($failureMap, $retval);
            }



            $this->alreadyInValidation = false;
        }

        return (!empty($failureMap) ? $failureMap : true);
    }

    /**
     * Retrieves a field from the object by name passed in as a string.
     *
     * @param string $name name
     * @param string $type The type of fieldname the $name is of:
     *               one of the class type constants BasePeer::TYPE_PHPNAME, BasePeer::TYPE_STUDLYPHPNAME
     *               BasePeer::TYPE_COLNAME, BasePeer::TYPE_FIELDNAME, BasePeer::TYPE_NUM.
     *               Defaults to BasePeer::TYPE_PHPNAME
     * @return mixed Value of field.
     */
    public function getByName($name, $type = BasePeer::TYPE_PHPNAME)
    {
        $pos = DamagesReportsTotalPeer::translateFieldName($name, $type, BasePeer::TYPE_NUM);
        $field = $this->getByPosition($pos);

        return $field;
    }

    /**
     * Retrieves a field from the object by Position as specified in the xml schema.
     * Zero-based.
     *
     * @param int $pos position in xml schema
     * @return mixed Value of field at $pos
     */
    public function getByPosition($pos)
    {
        switch ($pos) {
            case 0:
                return $this->getSzkodaId();
                break;
            case 1:
                return $this->getDataZgloszeniaSzkody();
                break;
            case 2:
                return $this->getDataUszkodzenia();
                break;
            case 3:
                return $this->getDataZgloszeniaDealera();
                break;
            case 4:
                return $this->getSamochodId();
                break;
            case 5:
                return $this->getSamochodVin();
                break;
            case 6:
                return $this->getSamochodNazwa();
                break;
            case 7:
                return $this->getSamochodNrKomisji();
                break;
            case 8:
                return $this->getStatusNazwa();
                break;
            case 9:
                return $this->getMarkaKod();
                break;
            case 10:
                return $this->getMarkaNazwa();
                break;
            case 11:
                return $this->getDealerNumer();
                break;
            case 12:
                return $this->getDealerMiasto();
                break;
            case 13:
                return $this->getUszkodzenieRodzajKod();
                break;
            case 14:
                return $this->getUszkodzenieRodzajNazwa();
                break;
            case 15:
                return $this->getUszkodzenieMiejsceKod();
                break;
            case 16:
                return $this->getUszkodzenieMiejsceNazwa();
                break;
            case 17:
                return $this->getUszkodzenieRozmiarKod();
                break;
            case 18:
                return $this->getUszkodzenieRozmiarNazwa();
                break;
            case 19:
                return $this->getKosztorysWartosc();
                break;
            case 20:
                return $this->getKosztorysUpustFlaga();
                break;
            case 21:
                return $this->getKosztorysUpustWartosc();
                break;
            case 22:
                return $this->getKosztorysUpustProcent();
                break;
            case 23:
                return $this->getKosztorysWartoscSamochodu();
                break;
            case 24:
                return $this->getKosztorysWartoscOdliczenie();
                break;
            case 25:
                return $this->getKosztorysDataDodania();
                break;
            case 26:
                return $this->getTypNazwa();
                break;
            case 27:
                return $this->getTypTransportu();
                break;
            case 28:
                return $this->getFakturaId();
                break;
            case 29:
                return $this->getFakturaWartoscSuma();
                break;
            case 30:
                return $this->getFakturaDataDodania();
                break;
            case 31:
                return $this->getNotaZaSzkodeWartoscSuma();
                break;
            case 32:
                return $this->getNotaZaSzkodeDataDodania();
                break;
            case 33:
                return $this->getNotaZaUtrateWartosciWartoscSuma();
                break;
            case 34:
                return $this->getNotaZaUtrateWartosciDataDodania();
                break;
            case 35:
                return $this->getProwadzacyImie();
                break;
            case 36:
                return $this->getProwadzacyNazwisko();
                break;
            case 37:
                return $this->getOpisUszkodzenia();
                break;
            case 38:
                return $this->getUwagi();
                break;
            default:
                return null;
                break;
        } // switch()
    }

    /**
     * Exports the object as an array.
     *
     * You can specify the key type of the array by passing one of the class
     * type constants.
     *
     * @param     string  $keyType (optional) One of the class type constants BasePeer::TYPE_PHPNAME, BasePeer::TYPE_STUDLYPHPNAME,
     *                    BasePeer::TYPE_COLNAME, BasePeer::TYPE_FIELDNAME, BasePeer::TYPE_NUM.
     *                    Defaults to BasePeer::TYPE_PHPNAME.
     * @param     boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to true.
     * @param     array $alreadyDumpedObjects List of objects to skip to avoid recursion
     *
     * @return array an associative array containing the field names (as keys) and field values
     */
    public function toArray($keyType = BasePeer::TYPE_PHPNAME, $includeLazyLoadColumns = true, $alreadyDumpedObjects = array())
    {
        if (isset($alreadyDumpedObjects['DamagesReportsTotal'][$this->getPrimaryKey()])) {
            return '*RECURSION*';
        }
        $alreadyDumpedObjects['DamagesReportsTotal'][$this->getPrimaryKey()] = true;
        $keys = DamagesReportsTotalPeer::getFieldNames($keyType);
        $result = array(
            $keys[0] => $this->getSzkodaId(),
            $keys[1] => $this->getDataZgloszeniaSzkody(),
            $keys[2] => $this->getDataUszkodzenia(),
            $keys[3] => $this->getDataZgloszeniaDealera(),
            $keys[4] => $this->getSamochodId(),
            $keys[5] => $this->getSamochodVin(),
            $keys[6] => $this->getSamochodNazwa(),
            $keys[7] => $this->getSamochodNrKomisji(),
            $keys[8] => $this->getStatusNazwa(),
            $keys[9] => $this->getMarkaKod(),
            $keys[10] => $this->getMarkaNazwa(),
            $keys[11] => $this->getDealerNumer(),
            $keys[12] => $this->getDealerMiasto(),
            $keys[13] => $this->getUszkodzenieRodzajKod(),
            $keys[14] => $this->getUszkodzenieRodzajNazwa(),
            $keys[15] => $this->getUszkodzenieMiejsceKod(),
            $keys[16] => $this->getUszkodzenieMiejsceNazwa(),
            $keys[17] => $this->getUszkodzenieRozmiarKod(),
            $keys[18] => $this->getUszkodzenieRozmiarNazwa(),
            $keys[19] => $this->getKosztorysWartosc(),
            $keys[20] => $this->getKosztorysUpustFlaga(),
            $keys[21] => $this->getKosztorysUpustWartosc(),
            $keys[22] => $this->getKosztorysUpustProcent(),
            $keys[23] => $this->getKosztorysWartoscSamochodu(),
            $keys[24] => $this->getKosztorysWartoscOdliczenie(),
            $keys[25] => $this->getKosztorysDataDodania(),
            $keys[26] => $this->getTypNazwa(),
            $keys[27] => $this->getTypTransportu(),
            $keys[28] => $this->getFakturaId(),
            $keys[29] => $this->getFakturaWartoscSuma(),
            $keys[30] => $this->getFakturaDataDodania(),
            $keys[31] => $this->getNotaZaSzkodeWartoscSuma(),
            $keys[32] => $this->getNotaZaSzkodeDataDodania(),
            $keys[33] => $this->getNotaZaUtrateWartosciWartoscSuma(),
            $keys[34] => $this->getNotaZaUtrateWartosciDataDodania(),
            $keys[35] => $this->getProwadzacyImie(),
            $keys[36] => $this->getProwadzacyNazwisko(),
            $keys[37] => $this->getOpisUszkodzenia(),
            $keys[38] => $this->getUwagi(),
        );

        return $result;
    }

    /**
     * Sets a field from the object by name passed in as a string.
     *
     * @param string $name peer name
     * @param mixed $value field value
     * @param string $type The type of fieldname the $name is of:
     *                     one of the class type constants BasePeer::TYPE_PHPNAME, BasePeer::TYPE_STUDLYPHPNAME
     *                     BasePeer::TYPE_COLNAME, BasePeer::TYPE_FIELDNAME, BasePeer::TYPE_NUM.
     *                     Defaults to BasePeer::TYPE_PHPNAME
     * @return void
     */
    public function setByName($name, $value, $type = BasePeer::TYPE_PHPNAME)
    {
        $pos = DamagesReportsTotalPeer::translateFieldName($name, $type, BasePeer::TYPE_NUM);

        $this->setByPosition($pos, $value);
    }

    /**
     * Sets a field from the object by Position as specified in the xml schema.
     * Zero-based.
     *
     * @param int $pos position in xml schema
     * @param mixed $value field value
     * @return void
     */
    public function setByPosition($pos, $value)
    {
        switch ($pos) {
            case 0:
                $this->setSzkodaId($value);
                break;
            case 1:
                $this->setDataZgloszeniaSzkody($value);
                break;
            case 2:
                $this->setDataUszkodzenia($value);
                break;
            case 3:
                $this->setDataZgloszeniaDealera($value);
                break;
            case 4:
                $this->setSamochodId($value);
                break;
            case 5:
                $this->setSamochodVin($value);
                break;
            case 6:
                $this->setSamochodNazwa($value);
                break;
            case 7:
                $this->setSamochodNrKomisji($value);
                break;
            case 8:
                $this->setStatusNazwa($value);
                break;
            case 9:
                $this->setMarkaKod($value);
                break;
            case 10:
                $this->setMarkaNazwa($value);
                break;
            case 11:
                $this->setDealerNumer($value);
                break;
            case 12:
                $this->setDealerMiasto($value);
                break;
            case 13:
                $this->setUszkodzenieRodzajKod($value);
                break;
            case 14:
                $this->setUszkodzenieRodzajNazwa($value);
                break;
            case 15:
                $this->setUszkodzenieMiejsceKod($value);
                break;
            case 16:
                $this->setUszkodzenieMiejsceNazwa($value);
                break;
            case 17:
                $this->setUszkodzenieRozmiarKod($value);
                break;
            case 18:
                $this->setUszkodzenieRozmiarNazwa($value);
                break;
            case 19:
                $this->setKosztorysWartosc($value);
                break;
            case 20:
                $this->setKosztorysUpustFlaga($value);
                break;
            case 21:
                $this->setKosztorysUpustWartosc($value);
                break;
            case 22:
                $this->setKosztorysUpustProcent($value);
                break;
            case 23:
                $this->setKosztorysWartoscSamochodu($value);
                break;
            case 24:
                $this->setKosztorysWartoscOdliczenie($value);
                break;
            case 25:
                $this->setKosztorysDataDodania($value);
                break;
            case 26:
                $this->setTypNazwa($value);
                break;
            case 27:
                $this->setTypTransportu($value);
                break;
            case 28:
                $this->setFakturaId($value);
                break;
            case 29:
                $this->setFakturaWartoscSuma($value);
                break;
            case 30:
                $this->setFakturaDataDodania($value);
                break;
            case 31:
                $this->setNotaZaSzkodeWartoscSuma($value);
                break;
            case 32:
                $this->setNotaZaSzkodeDataDodania($value);
                break;
            case 33:
                $this->setNotaZaUtrateWartosciWartoscSuma($value);
                break;
            case 34:
                $this->setNotaZaUtrateWartosciDataDodania($value);
                break;
            case 35:
                $this->setProwadzacyImie($value);
                break;
            case 36:
                $this->setProwadzacyNazwisko($value);
                break;
            case 37:
                $this->setOpisUszkodzenia($value);
                break;
            case 38:
                $this->setUwagi($value);
                break;
        } // switch()
    }

    /**
     * Populates the object using an array.
     *
     * This is particularly useful when populating an object from one of the
     * request arrays (e.g. $_POST).  This method goes through the column
     * names, checking to see whether a matching key exists in populated
     * array. If so the setByName() method is called for that column.
     *
     * You can specify the key type of the array by additionally passing one
     * of the class type constants BasePeer::TYPE_PHPNAME, BasePeer::TYPE_STUDLYPHPNAME,
     * BasePeer::TYPE_COLNAME, BasePeer::TYPE_FIELDNAME, BasePeer::TYPE_NUM.
     * The default key type is the column's BasePeer::TYPE_PHPNAME
     *
     * @param array  $arr     An array to populate the object from.
     * @param string $keyType The type of keys the array uses.
     * @return void
     */
    public function fromArray($arr, $keyType = BasePeer::TYPE_PHPNAME)
    {
        $keys = DamagesReportsTotalPeer::getFieldNames($keyType);

        if (array_key_exists($keys[0], $arr)) $this->setSzkodaId($arr[$keys[0]]);
        if (array_key_exists($keys[1], $arr)) $this->setDataZgloszeniaSzkody($arr[$keys[1]]);
        if (array_key_exists($keys[2], $arr)) $this->setDataUszkodzenia($arr[$keys[2]]);
        if (array_key_exists($keys[3], $arr)) $this->setDataZgloszeniaDealera($arr[$keys[3]]);
        if (array_key_exists($keys[4], $arr)) $this->setSamochodId($arr[$keys[4]]);
        if (array_key_exists($keys[5], $arr)) $this->setSamochodVin($arr[$keys[5]]);
        if (array_key_exists($keys[6], $arr)) $this->setSamochodNazwa($arr[$keys[6]]);
        if (array_key_exists($keys[7], $arr)) $this->setSamochodNrKomisji($arr[$keys[7]]);
        if (array_key_exists($keys[8], $arr)) $this->setStatusNazwa($arr[$keys[8]]);
        if (array_key_exists($keys[9], $arr)) $this->setMarkaKod($arr[$keys[9]]);
        if (array_key_exists($keys[10], $arr)) $this->setMarkaNazwa($arr[$keys[10]]);
        if (array_key_exists($keys[11], $arr)) $this->setDealerNumer($arr[$keys[11]]);
        if (array_key_exists($keys[12], $arr)) $this->setDealerMiasto($arr[$keys[12]]);
        if (array_key_exists($keys[13], $arr)) $this->setUszkodzenieRodzajKod($arr[$keys[13]]);
        if (array_key_exists($keys[14], $arr)) $this->setUszkodzenieRodzajNazwa($arr[$keys[14]]);
        if (array_key_exists($keys[15], $arr)) $this->setUszkodzenieMiejsceKod($arr[$keys[15]]);
        if (array_key_exists($keys[16], $arr)) $this->setUszkodzenieMiejsceNazwa($arr[$keys[16]]);
        if (array_key_exists($keys[17], $arr)) $this->setUszkodzenieRozmiarKod($arr[$keys[17]]);
        if (array_key_exists($keys[18], $arr)) $this->setUszkodzenieRozmiarNazwa($arr[$keys[18]]);
        if (array_key_exists($keys[19], $arr)) $this->setKosztorysWartosc($arr[$keys[19]]);
        if (array_key_exists($keys[20], $arr)) $this->setKosztorysUpustFlaga($arr[$keys[20]]);
        if (array_key_exists($keys[21], $arr)) $this->setKosztorysUpustWartosc($arr[$keys[21]]);
        if (array_key_exists($keys[22], $arr)) $this->setKosztorysUpustProcent($arr[$keys[22]]);
        if (array_key_exists($keys[23], $arr)) $this->setKosztorysWartoscSamochodu($arr[$keys[23]]);
        if (array_key_exists($keys[24], $arr)) $this->setKosztorysWartoscOdliczenie($arr[$keys[24]]);
        if (array_key_exists($keys[25], $arr)) $this->setKosztorysDataDodania($arr[$keys[25]]);
        if (array_key_exists($keys[26], $arr)) $this->setTypNazwa($arr[$keys[26]]);
        if (array_key_exists($keys[27], $arr)) $this->setTypTransportu($arr[$keys[27]]);
        if (array_key_exists($keys[28], $arr)) $this->setFakturaId($arr[$keys[28]]);
        if (array_key_exists($keys[29], $arr)) $this->setFakturaWartoscSuma($arr[$keys[29]]);
        if (array_key_exists($keys[30], $arr)) $this->setFakturaDataDodania($arr[$keys[30]]);
        if (array_key_exists($keys[31], $arr)) $this->setNotaZaSzkodeWartoscSuma($arr[$keys[31]]);
        if (array_key_exists($keys[32], $arr)) $this->setNotaZaSzkodeDataDodania($arr[$keys[32]]);
        if (array_key_exists($keys[33], $arr)) $this->setNotaZaUtrateWartosciWartoscSuma($arr[$keys[33]]);
        if (array_key_exists($keys[34], $arr)) $this->setNotaZaUtrateWartosciDataDodania($arr[$keys[34]]);
        if (array_key_exists($keys[35], $arr)) $this->setProwadzacyImie($arr[$keys[35]]);
        if (array_key_exists($keys[36], $arr)) $this->setProwadzacyNazwisko($arr[$keys[36]]);
        if (array_key_exists($keys[37], $arr)) $this->setOpisUszkodzenia($arr[$keys[37]]);
        if (array_key_exists($keys[38], $arr)) $this->setUwagi($arr[$keys[38]]);
    }

    /**
     * Build a Criteria object containing the values of all modified columns in this object.
     *
     * @return Criteria The Criteria object containing all modified values.
     */
    public function buildCriteria()
    {
        $criteria = new Criteria(DamagesReportsTotalPeer::DATABASE_NAME);

        if ($this->isColumnModified(DamagesReportsTotalPeer::SZKODA_ID)) $criteria->add(DamagesReportsTotalPeer::SZKODA_ID, $this->szkoda_id);
        if ($this->isColumnModified(DamagesReportsTotalPeer::DATA_ZGLOSZENIA_SZKODY)) $criteria->add(DamagesReportsTotalPeer::DATA_ZGLOSZENIA_SZKODY, $this->data_zgloszenia_szkody);
        if ($this->isColumnModified(DamagesReportsTotalPeer::DATA_USZKODZENIA)) $criteria->add(DamagesReportsTotalPeer::DATA_USZKODZENIA, $this->data_uszkodzenia);
        if ($this->isColumnModified(DamagesReportsTotalPeer::DATA_ZGLOSZENIA_DEALERA)) $criteria->add(DamagesReportsTotalPeer::DATA_ZGLOSZENIA_DEALERA, $this->data_zgloszenia_dealera);
        if ($this->isColumnModified(DamagesReportsTotalPeer::SAMOCHOD_ID)) $criteria->add(DamagesReportsTotalPeer::SAMOCHOD_ID, $this->samochod_id);
        if ($this->isColumnModified(DamagesReportsTotalPeer::SAMOCHOD_VIN)) $criteria->add(DamagesReportsTotalPeer::SAMOCHOD_VIN, $this->samochod_vin);
        if ($this->isColumnModified(DamagesReportsTotalPeer::SAMOCHOD_NAZWA)) $criteria->add(DamagesReportsTotalPeer::SAMOCHOD_NAZWA, $this->samochod_nazwa);
        if ($this->isColumnModified(DamagesReportsTotalPeer::SAMOCHOD_NR_KOMISJI)) $criteria->add(DamagesReportsTotalPeer::SAMOCHOD_NR_KOMISJI, $this->samochod_nr_komisji);
        if ($this->isColumnModified(DamagesReportsTotalPeer::STATUS_NAZWA)) $criteria->add(DamagesReportsTotalPeer::STATUS_NAZWA, $this->status_nazwa);
        if ($this->isColumnModified(DamagesReportsTotalPeer::MARKA_KOD)) $criteria->add(DamagesReportsTotalPeer::MARKA_KOD, $this->marka_kod);
        if ($this->isColumnModified(DamagesReportsTotalPeer::MARKA_NAZWA)) $criteria->add(DamagesReportsTotalPeer::MARKA_NAZWA, $this->marka_nazwa);
        if ($this->isColumnModified(DamagesReportsTotalPeer::DEALER_NUMER)) $criteria->add(DamagesReportsTotalPeer::DEALER_NUMER, $this->dealer_numer);
        if ($this->isColumnModified(DamagesReportsTotalPeer::DEALER_MIASTO)) $criteria->add(DamagesReportsTotalPeer::DEALER_MIASTO, $this->dealer_miasto);
        if ($this->isColumnModified(DamagesReportsTotalPeer::USZKODZENIE_RODZAJ_KOD)) $criteria->add(DamagesReportsTotalPeer::USZKODZENIE_RODZAJ_KOD, $this->uszkodzenie_rodzaj_kod);
        if ($this->isColumnModified(DamagesReportsTotalPeer::USZKODZENIE_RODZAJ_NAZWA)) $criteria->add(DamagesReportsTotalPeer::USZKODZENIE_RODZAJ_NAZWA, $this->uszkodzenie_rodzaj_nazwa);
        if ($this->isColumnModified(DamagesReportsTotalPeer::USZKODZENIE_MIEJSCE_KOD)) $criteria->add(DamagesReportsTotalPeer::USZKODZENIE_MIEJSCE_KOD, $this->uszkodzenie_miejsce_kod);
        if ($this->isColumnModified(DamagesReportsTotalPeer::USZKODZENIE_MIEJSCE_NAZWA)) $criteria->add(DamagesReportsTotalPeer::USZKODZENIE_MIEJSCE_NAZWA, $this->uszkodzenie_miejsce_nazwa);
        if ($this->isColumnModified(DamagesReportsTotalPeer::USZKODZENIE_ROZMIAR_KOD)) $criteria->add(DamagesReportsTotalPeer::USZKODZENIE_ROZMIAR_KOD, $this->uszkodzenie_rozmiar_kod);
        if ($this->isColumnModified(DamagesReportsTotalPeer::USZKODZENIE_ROZMIAR_NAZWA)) $criteria->add(DamagesReportsTotalPeer::USZKODZENIE_ROZMIAR_NAZWA, $this->uszkodzenie_rozmiar_nazwa);
        if ($this->isColumnModified(DamagesReportsTotalPeer::KOSZTORYS_WARTOSC)) $criteria->add(DamagesReportsTotalPeer::KOSZTORYS_WARTOSC, $this->kosztorys_wartosc);
        if ($this->isColumnModified(DamagesReportsTotalPeer::KOSZTORYS_UPUST_FLAGA)) $criteria->add(DamagesReportsTotalPeer::KOSZTORYS_UPUST_FLAGA, $this->kosztorys_upust_flaga);
        if ($this->isColumnModified(DamagesReportsTotalPeer::KOSZTORYS_UPUST_WARTOSC)) $criteria->add(DamagesReportsTotalPeer::KOSZTORYS_UPUST_WARTOSC, $this->kosztorys_upust_wartosc);
        if ($this->isColumnModified(DamagesReportsTotalPeer::KOSZTORYS_UPUST_PROCENT)) $criteria->add(DamagesReportsTotalPeer::KOSZTORYS_UPUST_PROCENT, $this->kosztorys_upust_procent);
        if ($this->isColumnModified(DamagesReportsTotalPeer::KOSZTORYS_WARTOSC_SAMOCHODU)) $criteria->add(DamagesReportsTotalPeer::KOSZTORYS_WARTOSC_SAMOCHODU, $this->kosztorys_wartosc_samochodu);
        if ($this->isColumnModified(DamagesReportsTotalPeer::KOSZTORYS_WARTOSC_ODLICZENIA)) $criteria->add(DamagesReportsTotalPeer::KOSZTORYS_WARTOSC_ODLICZENIA, $this->kosztorys_wartosc_odliczenia);
        if ($this->isColumnModified(DamagesReportsTotalPeer::KOSZTORYS_DATA_DODANIA)) $criteria->add(DamagesReportsTotalPeer::KOSZTORYS_DATA_DODANIA, $this->kosztorys_data_dodania);
        if ($this->isColumnModified(DamagesReportsTotalPeer::TYP_NAZWA)) $criteria->add(DamagesReportsTotalPeer::TYP_NAZWA, $this->typ_nazwa);
        if ($this->isColumnModified(DamagesReportsTotalPeer::TYP_TRANSPORTU)) $criteria->add(DamagesReportsTotalPeer::TYP_TRANSPORTU, $this->typ_transportu);
        if ($this->isColumnModified(DamagesReportsTotalPeer::FAKTURA_ID)) $criteria->add(DamagesReportsTotalPeer::FAKTURA_ID, $this->faktura_id);
        if ($this->isColumnModified(DamagesReportsTotalPeer::FAKTURA_WARTOSC_SUMA)) $criteria->add(DamagesReportsTotalPeer::FAKTURA_WARTOSC_SUMA, $this->faktura_wartosc_suma);
        if ($this->isColumnModified(DamagesReportsTotalPeer::FAKTURA_DATA_DODANIA)) $criteria->add(DamagesReportsTotalPeer::FAKTURA_DATA_DODANIA, $this->faktura_data_dodania);
        if ($this->isColumnModified(DamagesReportsTotalPeer::NOTA_ZA_SZKODE_WARTOSC_SUMA)) $criteria->add(DamagesReportsTotalPeer::NOTA_ZA_SZKODE_WARTOSC_SUMA, $this->nota_za_szkode_wartosc_suma);
        if ($this->isColumnModified(DamagesReportsTotalPeer::NOTA_ZA_SZKODE_DATA_DODANIA)) $criteria->add(DamagesReportsTotalPeer::NOTA_ZA_SZKODE_DATA_DODANIA, $this->nota_za_szkode_data_dodania);
        if ($this->isColumnModified(DamagesReportsTotalPeer::NOTA_ZA_UTRATE_WARTOSCI_WARTOSC_SUMA)) $criteria->add(DamagesReportsTotalPeer::NOTA_ZA_UTRATE_WARTOSCI_WARTOSC_SUMA, $this->nota_za_utrate_wartosci_wartosc_suma);
        if ($this->isColumnModified(DamagesReportsTotalPeer::NOTA_ZA_UTRATE_WARTOSCI_DATA_DODANIA)) $criteria->add(DamagesReportsTotalPeer::NOTA_ZA_UTRATE_WARTOSCI_DATA_DODANIA, $this->nota_za_utrate_wartosci_data_dodania);
        if ($this->isColumnModified(DamagesReportsTotalPeer::PROWADZACY_IMIE)) $criteria->add(DamagesReportsTotalPeer::PROWADZACY_IMIE, $this->prowadzacy_imie);
        if ($this->isColumnModified(DamagesReportsTotalPeer::PROWADZACY_NAZWISKO)) $criteria->add(DamagesReportsTotalPeer::PROWADZACY_NAZWISKO, $this->prowadzacy_nazwisko);
        if ($this->isColumnModified(DamagesReportsTotalPeer::OPIS_USZKODZENIA)) $criteria->add(DamagesReportsTotalPeer::OPIS_USZKODZENIA, $this->opis_uszkodzenia);
        if ($this->isColumnModified(DamagesReportsTotalPeer::UWAGI)) $criteria->add(DamagesReportsTotalPeer::UWAGI, $this->uwagi);

        return $criteria;
    }

    /**
     * Builds a Criteria object containing the primary key for this object.
     *
     * Unlike buildCriteria() this method includes the primary key values regardless
     * of whether or not they have been modified.
     *
     * @return Criteria The Criteria object containing value(s) for primary key(s).
     */
    public function buildPkeyCriteria()
    {
        $criteria = new Criteria(DamagesReportsTotalPeer::DATABASE_NAME);
        $criteria->add(DamagesReportsTotalPeer::SZKODA_ID, $this->szkoda_id);

        return $criteria;
    }

    /**
     * Returns the primary key for this object (row).
     * @return int
     */
    public function getPrimaryKey()
    {
        return $this->getSzkodaId();
    }

    /**
     * Generic method to set the primary key (szkoda_id column).
     *
     * @param  int $key Primary key.
     * @return void
     */
    public function setPrimaryKey($key)
    {
        $this->setSzkodaId($key);
    }

    /**
     * Returns true if the primary key for this object is null.
     * @return boolean
     */
    public function isPrimaryKeyNull()
    {

        return null === $this->getSzkodaId();
    }

    /**
     * Sets contents of passed object to values from current object.
     *
     * If desired, this method can also make copies of all associated (fkey referrers)
     * objects.
     *
     * @param object $copyObj An object of DamagesReportsTotal (or compatible) type.
     * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row.
     * @param boolean $makeNew Whether to reset autoincrement PKs and make the object new.
     * @throws PropelException
     */
    public function copyInto($copyObj, $deepCopy = false, $makeNew = true)
    {
        $copyObj->setDataZgloszeniaSzkody($this->getDataZgloszeniaSzkody());
        $copyObj->setDataUszkodzenia($this->getDataUszkodzenia());
        $copyObj->setDataZgloszeniaDealera($this->getDataZgloszeniaDealera());
        $copyObj->setSamochodId($this->getSamochodId());
        $copyObj->setSamochodVin($this->getSamochodVin());
        $copyObj->setSamochodNazwa($this->getSamochodNazwa());
        $copyObj->setSamochodNrKomisji($this->getSamochodNrKomisji());
        $copyObj->setStatusNazwa($this->getStatusNazwa());
        $copyObj->setMarkaKod($this->getMarkaKod());
        $copyObj->setMarkaNazwa($this->getMarkaNazwa());
        $copyObj->setDealerNumer($this->getDealerNumer());
        $copyObj->setDealerMiasto($this->getDealerMiasto());
        $copyObj->setUszkodzenieRodzajKod($this->getUszkodzenieRodzajKod());
        $copyObj->setUszkodzenieRodzajNazwa($this->getUszkodzenieRodzajNazwa());
        $copyObj->setUszkodzenieMiejsceKod($this->getUszkodzenieMiejsceKod());
        $copyObj->setUszkodzenieMiejsceNazwa($this->getUszkodzenieMiejsceNazwa());
        $copyObj->setUszkodzenieRozmiarKod($this->getUszkodzenieRozmiarKod());
        $copyObj->setUszkodzenieRozmiarNazwa($this->getUszkodzenieRozmiarNazwa());
        $copyObj->setKosztorysWartosc($this->getKosztorysWartosc());
        $copyObj->setKosztorysUpustFlaga($this->getKosztorysUpustFlaga());
        $copyObj->setKosztorysUpustWartosc($this->getKosztorysUpustWartosc());
        $copyObj->setKosztorysUpustProcent($this->getKosztorysUpustProcent());
        $copyObj->setKosztorysWartoscSamochodu($this->getKosztorysWartoscSamochodu());
        $copyObj->setKosztorysWartoscOdliczenie($this->getKosztorysWartoscOdliczenie());
        $copyObj->setKosztorysDataDodania($this->getKosztorysDataDodania());
        $copyObj->setTypNazwa($this->getTypNazwa());
        $copyObj->setTypTransportu($this->getTypTransportu());
        $copyObj->setFakturaId($this->getFakturaId());
        $copyObj->setFakturaWartoscSuma($this->getFakturaWartoscSuma());
        $copyObj->setFakturaDataDodania($this->getFakturaDataDodania());
        $copyObj->setNotaZaSzkodeWartoscSuma($this->getNotaZaSzkodeWartoscSuma());
        $copyObj->setNotaZaSzkodeDataDodania($this->getNotaZaSzkodeDataDodania());
        $copyObj->setNotaZaUtrateWartosciWartoscSuma($this->getNotaZaUtrateWartosciWartoscSuma());
        $copyObj->setNotaZaUtrateWartosciDataDodania($this->getNotaZaUtrateWartosciDataDodania());
        $copyObj->setProwadzacyImie($this->getProwadzacyImie());
        $copyObj->setProwadzacyNazwisko($this->getProwadzacyNazwisko());
        $copyObj->setOpisUszkodzenia($this->getOpisUszkodzenia());
        $copyObj->setUwagi($this->getUwagi());
        if ($makeNew) {
            $copyObj->setNew(true);
            $copyObj->setSzkodaId(NULL); // this is a auto-increment column, so set to default value
        }
    }

    /**
     * Makes a copy of this object that will be inserted as a new row in table when saved.
     * It creates a new object filling in the simple attributes, but skipping any primary
     * keys that are defined for the table.
     *
     * If desired, this method can also make copies of all associated (fkey referrers)
     * objects.
     *
     * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row.
     * @return DamagesReportsTotal Clone of current object.
     * @throws PropelException
     */
    public function copy($deepCopy = false)
    {
        // we use get_class(), because this might be a subclass
        $clazz = get_class($this);
        $copyObj = new $clazz();
        $this->copyInto($copyObj, $deepCopy);

        return $copyObj;
    }

    /**
     * Returns a peer instance associated with this om.
     *
     * Since Peer classes are not to have any instance attributes, this method returns the
     * same instance for all member of this class. The method could therefore
     * be static, but this would prevent one from overriding the behavior.
     *
     * @return DamagesReportsTotalPeer
     */
    public function getPeer()
    {
        if (self::$peer === null) {
            self::$peer = new DamagesReportsTotalPeer();
        }

        return self::$peer;
    }

    /**
     * Clears the current object and sets all attributes to their default values
     */
    public function clear()
    {
        $this->szkoda_id = null;
        $this->data_zgloszenia_szkody = null;
        $this->data_uszkodzenia = null;
        $this->data_zgloszenia_dealera = null;
        $this->samochod_id = null;
        $this->samochod_vin = null;
        $this->samochod_nazwa = null;
        $this->samochod_nr_komisji = null;
        $this->status_nazwa = null;
        $this->marka_kod = null;
        $this->marka_nazwa = null;
        $this->dealer_numer = null;
        $this->dealer_miasto = null;
        $this->uszkodzenie_rodzaj_kod = null;
        $this->uszkodzenie_rodzaj_nazwa = null;
        $this->uszkodzenie_miejsce_kod = null;
        $this->uszkodzenie_miejsce_nazwa = null;
        $this->uszkodzenie_rozmiar_kod = null;
        $this->uszkodzenie_rozmiar_nazwa = null;
        $this->kosztorys_wartosc = null;
        $this->kosztorys_upust_flaga = null;
        $this->kosztorys_upust_wartosc = null;
        $this->kosztorys_upust_procent = null;
        $this->kosztorys_wartosc_samochodu = null;
        $this->kosztorys_wartosc_odliczenia = null;
        $this->kosztorys_data_dodania = null;
        $this->typ_nazwa = null;
        $this->typ_transportu = null;
        $this->faktura_id = null;
        $this->faktura_wartosc_suma = null;
        $this->faktura_data_dodania = null;
        $this->nota_za_szkode_wartosc_suma = null;
        $this->nota_za_szkode_data_dodania = null;
        $this->nota_za_utrate_wartosci_wartosc_suma = null;
        $this->nota_za_utrate_wartosci_data_dodania = null;
        $this->prowadzacy_imie = null;
        $this->prowadzacy_nazwisko = null;
        $this->opis_uszkodzenia = null;
        $this->uwagi = null;
        $this->alreadyInSave = false;
        $this->alreadyInValidation = false;
        $this->clearAllReferences();
        $this->resetModified();
        $this->setNew(true);
        $this->setDeleted(false);
    }

    /**
     * Resets all references to other model objects or collections of model objects.
     *
     * This method is a user-space workaround for PHP's inability to garbage collect
     * objects with circular references (even in PHP 5.3). This is currently necessary
     * when using Propel in certain daemon or large-volumne/high-memory operations.
     *
     * @param boolean $deep Whether to also clear the references on all referrer objects.
     */
    public function clearAllReferences($deep = false)
    {
        if ($deep) {
        } // if ($deep)

    }

    /**
     * return the string representation of this object
     *
     * @return string
     */
    public function __toString()
    {
        return (string) $this->exportTo(DamagesReportsTotalPeer::DEFAULT_STRING_FORMAT);
    }

    /**
     * return true is the object is in saving state
     *
     * @return boolean
     */
    public function isAlreadyInSave()
    {
        return $this->alreadyInSave;
    }

}
